<template>
  <div>
      <h3>count值为:{{$store.state.count}},count是一个:{{$store.getters.oddOrEven}}</h3>
      <button @click="increment">按钮+</button>
      <button @click="decrement">按钮-</button>
      <button @click="evenAdd">按钮奇数加</button>
      <button @click="asyncAdd">按钮incrementAsync</button>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods:{
      increment(){
          this.$store.dispatch('increment',1)
      },
      decrement(){
          this.$store.dispatch('decrement',1)
      },
      evenAdd(){
          this.$store.dispatch('evenAdd',1)
      },
      asyncAdd(){
          this.$store.dispatch('asyncAdd',1)
      }
  }
}
</script>

<style lang="less" scoped>

</style>
